package table_Mixage;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;


public class TestFragment {
	Fragment frag= new Fragment(1,2);
	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testFragment() {
		Fragment frag2 = new Fragment(5,2);
		assertEquals(5,frag2.getDateDebut());
	}

	@Test
	public void testGetDateDebut() {
		assertEquals(1,frag.getDateDebut());
	}

	@Test
	public void testGetDuree() {
		assertEquals(2,frag.getDuree());
	}

	@Test
	public void testGetDateFin() {
		assertEquals(3,frag.getDateFin());
	}

	@Test
	public void testSetDateDebut() {
		frag.setDateDebut(10);
		assertEquals(10,frag.getDateDebut());
	}

	@Test
	public void testSetDuree() {
		frag.setDuree(20);
		assertEquals(20,frag.getDuree());
	}

	@Test
	public void testSetDateFin() {
		frag.setDateFin(30);
		assertEquals(30,frag.getDateFin());
	}
	
	@Test
	public void testToString() {

		assertEquals(" Debut Fragment: 1 Fin Fragment: 3 Duree: 2",frag.toString());
	}
	
	@Test
	public void testEquals() {

		assertEquals(true,frag.equals(frag));
	}

}
